-
Notifications
You must be signed in to change notification settings - Fork 739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove dependency on apollo CLI for fetching schema #1935
Conversation
…r than using the JS CLI
…request" This reverts commit 9aac6367a611260ffea12e3b0ae965b999d9b9d3.
I tried pulling some of this stuff into Core but you have to pull so much into core to make it work since by default it uses a bunch of `Apollo` only types that it kind of defeats the point of keeping core small, and realistically the only place where we even *should* be using untyped queries is in grabbing the schema.
…ause the JSON is so damned huge
…o an actual schema rather than just being json
…ownloaded Introspection file.
…bally installed it
* renamed for better context * improved initializer
Tests/ApolloServerIntegrationTests/SchemaRegistryApolloSchemaDownloaderTests.swift
Show resolved
Hide resolved
75b7278
to
6e5e1dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on this! So glad to have this finished, and it looks great. Just a couple of suggestions.
One question: Do you know why the bundled ApolloCodegenFrontend.bundle.js changed? Did we need to make changes to the js library?
Yeah there was one method I had to expose for moving between JSON and SDL - I'm not quite seeing where the actual code went, though. Not sure if it got eaten in a merge or what |
This is the exact diff - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question re testing, otherwise this is
This change removes a dependency on the Apollo CLI for schema downloading. Schema downloads are now Swift-based and maintainable/extensible within apollo-ios.
Notable changes:
URLDownloader
fromCLIDownloader
; used in both CLI and schema downloading. CLI downloading will be removed along with the Swift codegen implementation.UntypedGraphQLRequestBodyCreator
- a non-type-safe request creator to facilitate sending requests not using code generation.ApolloSchemaOptions
ApolloSchemaDownloadConfiguration
for a more specific naming context.ApolloSchemaDownloader
APIsfetch(with:)
is more expressive thanrun(options:)
.Closes #1823